package com.pacy.swj.swjwb.Utils;

import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.view.View;

/**
 * @author PACY
 * 创建时间 19/6/14 15:07.
 * 邮箱 pengwwe457621023@qq.com
 * 类描述
 */
public class ColorUtils {
    public static void setBackgroundColor(View view, int position) {
        GradientDrawable background = (GradientDrawable) view.getBackground();
        if (position % 5 == 0) {
            background.setColor(Color.parseColor("#FFA500"));
        }
        if (position % 5 == 1) {
            background.setColor(Color.parseColor("#7B7AFD"));
        }
        if (position % 5 == 2) {
            background.setColor(Color.parseColor("#E555B9"));
        }
        if (position % 5 == 3) {
            background.setColor(Color.parseColor("#FF655B"));
        }
        if (position % 5 == 4) {
            background.setColor(Color.parseColor("#00A9FB"));
        }


    }
}
